package com.xz.knowledgeDuplication.exception;

import com.xz.knowledgeDuplication.result.ResponseEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * App异常
 *
 * @author 召
 * @date 2021-12-26 21:18:49
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AppException extends RuntimeException {

    private String code;

    private String msg;

    public AppException(ResponseEnum responseEnum) {
        this.code = responseEnum.getCode();
        this.msg = responseEnum.getMsg();
    }
}
